package com.future.dao;

import java.util.List;

import com.future.common.base.BaseDao;
import com.future.model.Commenthit;
import com.jfinal.plugin.activerecord.Db;

public class CommentHitsDao extends BaseDao<Commenthit> {
	public List<Commenthit> getCommentHits(Long commentId) {
		return find(commentId);
	}

	public void deleteByCommentId(Long commentId) {
		Db.update(getSqlPara(commentId));
	}

	public Boolean checkDz(Long commentid, Long userid) {
		Commenthit commenthit = findFirst(commentid, userid);
		if (commenthit == null) {
			return false;
		} else {
			return true;
		}
	}
}
